//
//  GYBleDataManager.h
//  LockManagement
//
//  Created by 丁燕春 on 2018/8/2.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface GYBleDataManager : NSObject


/**
 data数据转换成16进制字符串  //在转换成10进制的number

 @param data <#data description#>
 @return <#return value description#>
 */
+ (NSNumber *)convertDataToHexStr:(NSData *)data;

/**
 将16进制字符串转换成NSData

 @param str <#str description#>
 @return <#return value description#>
 */
+ (NSMutableData *)convertHexStrToData:(NSString *)str;

#pragma mark -- 蓝牙命令数据

/**
 获取蓝牙电量数据

 @return <#return value description#>
 */
+ (NSData *)getKeyElc;

/**
 获取钥匙的mac地址

 @return <#return value description#>
 */
+ (NSData *)getkeyMacAddress;

/**
 初始化锁具

 @return <#return value description#>
 */
+ (NSData *)setupLock;

/**
 读取门锁信息

 @return <#return value description#>
 */
+ (NSData *)getLockInfomation;

/**
 开门或则关门

 @return <#return value description#>
 */
+ (NSData *)openOrCloseTheDoor:(NSString *)lockID schoolBeginTime:(NSString *)beignTime schoolEndTime:(NSString *)endTime schoolTime:(NSString *)schoolTime operationType:(int)type SecretKey:(id)screctkey;


/**
 授权钥匙

 @param lockData <#lockID description#>
 @param beignTime <#beignTime description#>
 @param endTime <#endTime description#>
 @param schoolTime <#schoolTime description#>
 @param type 1字节 0:清除 1：添加 2：删除
 @return <#return value description#>
 */
+ (NSData *)autoKey:(NSData *)lockData schoolBeginTime:(NSString *)beignTime schoolEndTime:(NSString *)endTime schoolTime:(NSString *)schoolTime operationType:(int)type mac:(NSString *)macHexString;

/**
 绑定蓝牙钥匙

 @return <#return value description#>
 */
+ (NSData *)bindBleKey;

/**
 查询锁具详细信息

 @return <#return value description#>
 */
+ (NSData *)getLockDetailesInfomations;

/**
 给锁校时

 @return <#return value description#>
 */
+ (NSData *)schoolTimeToLock;

/**
 重置秘钥

 @return <#return value description#>
 */
+ (NSData *)resetSecretKey;

/**
 修改锁识别号(只用于未安装的锁) -->可能要添加参数 新锁的识别号

 @return <#return value description#>
 */
+ (NSData *)modfyLockNumber;

/**
 给钥匙校时

 @return <#return value description#>
 */
+ (NSData *)schoolTimeToKey;

/**
 协商通讯秘钥 第一步

 @return <#return value description#>
 */
+ (NSData *)consultKey;

/**
 协商通讯秘钥第二部

 @param type <#type description#>
 @param contentData <#contentData description#>
 @return <#return value description#>
 */
+ (NSData *)consultKeySecond:(int)type content:(NSData *)contentData secret_key:(id)secret_key;

/**
 锁日志上传

 @return <#return value description#>
 */
+ (NSData *)uploadLockLog;







@end
